package com.tedu.pojo;

import com.mysql.cj.protocol.Resultset;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.*;

@RestController
    @RequestMapping("/stud")
public class StudentController {
        @RequestMapping("add")
        public  void  add() throws ClassNotFoundException, SQLException {
            Class.forName("com.mysql.cj.jdbc.Driver");
            String url="";

            Connection conn = DriverManager.getConnection(url,"root","root");
            String sql ="select * from emp";
            PreparedStatement ps = conn.prepareStatement(sql);
            ResultSet rs =  ps.executeQuery();

        }

}
